package com.perceptivesoftware.licensing.domain.generated;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TwRoleprivId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TwRoleprivId implements java.io.Serializable
{

	// Fields    

	private String roleprivRoleCode;

	private Long roleprivPrivType;

	private Long roleprivPrivAction;

	private String roleprivItemCode;

	// Constructors

	/** default constructor */
	public TwRoleprivId()
	{
		// empty constructor required for Spring
	}

	// Property accessors

	@Column(name = "ROLEPRIV_ROLE_CODE", nullable = false, length = 38)
	public String getRoleprivRoleCode()
	{
		return this.roleprivRoleCode;
	}

	public void setRoleprivRoleCode(String roleprivRoleCode)
	{
		this.roleprivRoleCode = roleprivRoleCode;
	}

	@Column(name = "ROLEPRIV_PRIV_TYPE", nullable = false, scale = 0)
	public Long getRoleprivPrivType()
	{
		return this.roleprivPrivType;
	}

	public void setRoleprivPrivType(Long roleprivPrivType)
	{
		this.roleprivPrivType = roleprivPrivType;
	}

	@Column(name = "ROLEPRIV_PRIV_ACTION", nullable = false, scale = 0)
	public Long getRoleprivPrivAction()
	{
		return this.roleprivPrivAction;
	}

	public void setRoleprivPrivAction(Long roleprivPrivAction)
	{
		this.roleprivPrivAction = roleprivPrivAction;
	}

	@Column(name = "ROLEPRIV_ITEM_CODE", nullable = false, length = 38)
	public String getRoleprivItemCode()
	{
		return this.roleprivItemCode;
	}

	public void setRoleprivItemCode(String roleprivItemCode)
	{
		this.roleprivItemCode = roleprivItemCode;
	}

	public boolean equals(Object other)
	{
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TwRoleprivId))
			return false;
		TwRoleprivId castOther = (TwRoleprivId) other;

		return ((this.getRoleprivRoleCode() == castOther.getRoleprivRoleCode()) || (this.getRoleprivRoleCode() != null && castOther.getRoleprivRoleCode() != null && this.getRoleprivRoleCode().equals(
				castOther.getRoleprivRoleCode()))) && ((this.getRoleprivPrivType() == castOther.getRoleprivPrivType()) || (this.getRoleprivPrivType() != null && castOther.getRoleprivPrivType() != null && this.getRoleprivPrivType().equals(
				castOther.getRoleprivPrivType()))) && ((this.getRoleprivPrivAction() == castOther.getRoleprivPrivAction()) || (this.getRoleprivPrivAction() != null && castOther.getRoleprivPrivAction() != null && this.getRoleprivPrivAction().equals(
				castOther.getRoleprivPrivAction()))) && ((this.getRoleprivItemCode() == castOther.getRoleprivItemCode()) || (this.getRoleprivItemCode() != null && castOther.getRoleprivItemCode() != null && this.getRoleprivItemCode().equals(
				castOther.getRoleprivItemCode())));
	}

	public int hashCode()
	{
		int result = 17;

		result = 37 * result + (getRoleprivRoleCode() == null ? 0 : this.getRoleprivRoleCode().hashCode());
		result = 37 * result + (getRoleprivPrivType() == null ? 0 : this.getRoleprivPrivType().hashCode());
		result = 37 * result + (getRoleprivPrivAction() == null ? 0 : this.getRoleprivPrivAction().hashCode());
		result = 37 * result + (getRoleprivItemCode() == null ? 0 : this.getRoleprivItemCode().hashCode());
		return result;
	}

}